package cn.snowheart.comination;

import cn.snowheart.comination.menu.Menu;
import cn.snowheart.comination.menu.MenuComponent;
import cn.snowheart.comination.menu.MenuItem;

/**
 * 服务员测试类
 *
 * @author liuwanxiang
 * @version 2019/07/15
 */
public class WaiterTest {

    public static void main(String[] args) {

        MenuComponent menu1 = new Menu("PANCAKE HOUSE MENU", "Breakfast");
        menu1.add(new MenuItem("Pancake1", "Milk", true, 0.99));
        menu1.add(new MenuItem("Pancake2", "Cake", true, 1.99));
        menu1.add(new MenuItem("Pancake3", "Egg.", true, 0.39));
        menu1.add(new MenuItem("Pancake4", "Fruit", true, 1.49));

        MenuComponent menu2 = new Menu("PIZZA HOUSE MENU", "Diner");
        menu2.add(new MenuItem("Pizza1", "New York", true, 3.99));
        menu2.add(new MenuItem("Pizza2", "Beijing", true, 5.99));
        menu2.add(new MenuItem("Pizza3", "Chicago", true, 2.99));
        menu2.add(new MenuItem("Pizza4", "Washington", true, 4.99));

        Menu menu = new Menu("ALL MENUS", "All menus");
        menu.add(menu1);
        menu.add(menu2);

        Waiter waiter = new Waiter(menu);
        waiter.print();
    }

}
